Enterprise Objects Framework Release 1.1 Copyright ã1995 by NeXT Computer, Inc.  All Rights Reserved.

EOMasterDataSources

Adopted By:	EODatabaseDataSource
EODetailDatabaseDataSource

Incorporates:	EODataSources

Declared In:	eoaccess/EODataSources.h

Protocol Description

The EOMasterDataSources protocol defines the dataSourceQualifiedByKey: method for creating detail data sources. See the EOQualifiableDataSources protocol specification for an explanation of master-detail data sources.

Instance Methods

dataSourceQualifiedByKey:

- (id <EOQualifiableDataSources>)dataSourceQualifiedByKey:(NSString *)aName

Returns a data source object that supplies objects based on aName, which is the name of a relationship of the receiver's enterprise objects. Returns nil if a data source can't be created for aName. The new detail data source must be qualified with qualifyWithRelationshipKey:ofObject: before it will supply any objects. See the EOQualifiableDataSources protocol specification for examples.

If you link two EOControllers with an EOQualifiedAssociation and the destination controller has no data source, the EOQualifiedAssociation uses this method to create a data source for the detail controller.

In implementing this method, note that the qualifyWithRelationshipKey:ofObject: method declared in the EOQualifiableDataSources protocol also accepts the relationship name. dataSourceQualifiedByKey: can thus safely ignore aName, but may use it for such a purpose as choosing a qualifiable data source class to instantiate.